<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" href="css/common.css" type="text/css" />
        <link href="css/adminstyle.css" rel="stylesheet" type="text/css">
        <title>            管理区域        </title>
        <script src="js/js.js">
        </script>
        <script language="javascript" type="text/javascript" src="js/jquery-1.9.1.min.js">
        </script>
        <script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js">
        </script>
        <script>
            function delc(id) {
                if (confirm('确认要删除此栏目，将删除所属子栏目及信息')) {
                    self.location.href = 'employees_delete.html?id=' + id;
                }
            }
            function submits1(action) {
                var check_flg = false;
                $("input:checkbox[name='id[]']:checked").each(function() {
                    check_flg = true;
                })
                if (check_flg == true) {
                    document.getElementById('form').action = action;
                    document.getElementById('form').submit();
                } else {
                    alert('请选中相应的人员进行操作');
                }
            }

            function userOpen(url){
            	window.open(url,'','width=1000,height=550');
            }            
        </script>
    </head>
    
    <body style="background-color:#FFFFFF">
        <div id="man_zone">
            <div class="search_condition" style="padding-top:10px; padding-bottom:10px; ">
                <form>
                    订单号<input name="order_no" type="text" value="<?=getParamValue('order_no')?>" />
                    订单时间
                    <input name="start_time" type="text" onClick="WdatePicker()" value="<?=getParamValue('start_time')?>" />-
                    <input onClick="WdatePicker()" name="end_time" type="text" value="<?=getParamValue('end_time')?>"  />
                    用户手机
                    <input name="phone" type="text" />                    支付方式
                    <select name="pay_type">
                        <option value=""> 请选择</option>
                        <?=$payTypeOption?>
                    </select>
                   	支付状态
                    <select name="pay_status">
                        <option value=""> 请选择</option>
                        <?=$payStatusOption?>
                    </select>                    
                    <input name="submit"  class="PublicBot" type="submit" value="提交" />
                </form>
            </div>
		 	<div class="search_condition" style="padding-top:10px; padding-bottom:10px; ">
		 	 <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1"    class="tableborder">
		 	 	<tr  class="header">
		 	 	<td width="25">
		 	 		本月销售目标
		 		 </td>
		 	 	<td width="25">
		 	 		实际完成
		 		 </td>
		 	 	<td width="25">
		 	 		付款订单
		 		 </td>		 		 
		 	 	<td width="25">
		 	 		尚待完成
		 		 </td>
		 		 </tr>
		 	 	<tr  bgcolor="#FFFFFF">
		 	 	<td width="25" align="center">
		 	 		<?=number_format($salePurpose*10000,2)?>
		 		 </td>
		 	 	<td width="25"  align="center">
		 	 		<?=number_format($saleComplete['sumamount'],2)?>
		 		 </td>
		 	 	<td width="25"  align="center">
		 	 		<?=$saleComplete['cnt']?>
		 		 </td>		 		 
		 	 	<td width="25"  align="center">
		 	 		<font color="red">
		 	 		<?=number_format($saleUncomplete,2)?></font>
		 		 </td>
		 		 </tr>
		 		</table>
		 	 <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1"    class="tableborder">
		 	 	<tr  class="header">
		 	 	<td width="25">
		 	 	      新用户 注册目标
		 		 </td>		 	
		 	 	<td width="25">
		 	 	        付费目标(新注册)
		 		 </td>			 		 	 
		 	 	<td width="25">
				   未体验未付费(新注册)
		 	 	</td>		
		 		 <td width="25">
		 		 体验未付费(新注册)
		 		 </td>		
		 		 <td width="25">
		 	 	  已付费(新注册)
		 		 </td>		
		 		 <td width="25">
		 	 	  尚未完成注册目标
		 		 </td>		
		 		 <td width="25">
		 	 	  尚未完成付费目标
		 		 </td>	
		 		 </tr>
		 	 	<tr  bgcolor="#FFFFFF">
		 	 	<td width="25"  align="center">
		 	 		<?=$registerPurpose?>
		 		 </td>
		 	 	<td width="25"  align="center">
		 	 		<?=$registerPayPurpose?>
		 		 </td>			 		 		 		 
		 	 	<td width="25"  align="center">
		 	 		<a onClick="userOpen('user_lists.html?start_time=<?=date('Y-m-'.'01')?>&user_type=1&filter=1')" href="javaScript:void(0);"><?=$registerNoaction?></a>
		 		 </td>		
		 		 <td width="25"  align="center">
		 		 	<a  onClick="userOpen('user_lists.html?start_time=<?=date('Y-m-'.'01')?>&user_type=2&filter=1')" href="javaScript:void(0);"><?=$registerExperience?></a>
		 		 </td>		
		 		 <td width="25" align="center">
		 		 	<a  onClick="userOpen('user_lists.html?start_time=<?=date('Y-m-'.'01')?>&user_type=3&filter=1')" href="javaScript:void(0);"><?=$registerMoney?></a>
		 		 </td>		
		 		 <td width="25" align="center">
		 		 	<font color="red">
		 		 	<?=$registerUncomplete?>
		 		 	</font>
		 		 </td>		
		 		 <td width="25" align="center">
		 		 	<font color="red">
		 		 	<?=$registerPayUncomplete?>
		 		 	</font>
		 		 </td>			 		 
		 		 </tr>
		 		</table>		 		
            </div>            
            <form method="get" id="form">
                <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1"      class="tableborder">
                    <tr class="header">
                        <td width="25">
                        </td>
                        <td>
                            订单号
                        </td>
                        <td>
                            订单状态
                        </td>
                        <td>
                            学员
                        </td>
                        <td>
                            订单时间
                        </td>
                        <td>
                            支付方式
                        </td>
                        <td>
                            支付状态
                        </td>
                        <td>
                            订单内容
                        </td>
                        <td>
                            订单金额
                        </td>
                        <td>
                            优惠方式
                        </td>
                        <td>
                            优惠金额
                        </td>
                        <td>
                            应付金额
                        </td>
                        <td>
                            操作
                        </td>
                    </tr>
                    <? foreach($list as $v){ ?>
                        <tr bgcolor="#FFFFFF">
                            <td align="center">
                                <input type="checkbox" name="id[]" id="checkbox" value="<?=$v['id']?>">
                            </td>
                            <td align="center">
                                <a href="order_info.html?id=<?=$v['id']?>">
                                    <?=$v['order_no']?>
                                </a>
                            </td>
                            <td align="center">
                                <?=$v['order_status']?>
                            </td>
                            <td align="center">
                                <a href="user_info.html?id=<?=$v['user_id']?>" target="_blank"><?=getStr($userList, $v['user_id'])?></a>
                            </td>
                            <td align="center">
                                <?=date('Y-m-d',$v['add_time'])?>
                            </td>
                            <td align="center">
                                <?=$v['pay_type_name']?>
                            </td>
                            <td align="center">
                                <?=$v['pay_status_name']?>
                            </td>
                            <td align="center">
                                <? $tmp=array(); foreach($v['product_id'] as $v1){?>
                                    <?=$productList[$v1]?><br>
                                <?}?>
                            </td>
                            <td align="center">
                              <?=number_format($v['order_amount'],2)?>
                            </td>
                            <td align="center">
                              <?=getStr($v,'preferential')?>
                            </td>
                            <td align="center">
                              <?=getStr($v,'preferentialMoney')?>
                            </td>
                            <td align="center">
                              <?=number_format($v['order_amount']-$v['user_money']-$v[ 'discount_money']-$v['ticket_money']-$v['online_money'],2)?>
                            </td>
                            <td align="center">
                                <a href="Order_info.html?id=<?=$v['id']?>">
                                    处理
                                </a>
                            </td>
                        </tr>
                        <? } ?>
                            <tr bgcolor="#FFFFFF">
                                <td align="center">
                                    <input type="checkbox" name="chkall" id="checkbox" onClick="CheckAll(this.form)">
                                </td>
                                <td colspan="12" align="center">
                                    <? echo $page; ?>
                                </td>
                            </tr>
                </table>
            </form>
        </div>
    </body>
</html>